import request from '@/utils/request.js'

const state = {
	categoryList:[],
}
const mutations = {
	SET_CATEGORYLIST(state,categoryList){
		state.categoryList = categoryList
	}
}
const actions = {
	// 获取分类列表
	async getCategoryList({commit}){
		try{
			const result = await request('/category/app/selectCategory?channelCode=2&t=1663085010733&platform=5&channel=2')
			commit('SET_CATEGORYLIST',result.data)
		}catch(e){
			console.log(e)
		}
	}
}
const getters = {

}

export default {
	namespaced:true,
	state,
	mutations,
	actions,
	getters
}